package com.iting.test.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;

/**
 * @author Nie ZhiPeng
 */
@Service
public class RedisService {
	@Autowired
	private RedisTemplate<Object, Object> redisTemplate;
	@Autowired
	private StringRedisTemplate stringRedisTemplate;

	public void set(String key, String value){
		stringRedisTemplate.opsForValue().set(key,value);
	}

	public String get(String key){
		return stringRedisTemplate.opsForValue().get("a");
	}
}
